//
//  ZYCCourseRegistrationDetailModel.m
//  ZDSC
//
//  Created by ZDTX on 2021/8/17.
//

#import "ZYCCourseRegistrationDetailModel.h"
@implementation ZYCCourseTeachTimeModel

- (NSString *)weekChine{
    if ([self.week isEqualToString:@"1"]) {
        return @"星期一";
    }else if([self.week isEqualToString:@"2"]){
        return @"星期二";
    }else if([self.week isEqualToString:@"3"]){
        return @"星期三";
    }else if([self.week isEqualToString:@"4"]){
        return @"星期四";
    }else if([self.week isEqualToString:@"5"]){
        return @"星期五";
    }else if([self.week isEqualToString:@"6"]){
        return @"星期六";
    }else{
        return @"星期日";
    }
}
+ (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper{
    return @{@"s_id":@"id"};
}



@end

@implementation ZYCCourseStudentInfoModel

- (NSString *)gradeChinese{
    NSInteger grade = [self.gradeName integerValue];
    switch (grade) {
        case 1:{
            return @"一年级";
            break;
        }
        case 2:{
            return @"二年级";
            break;
        }
        case 3:{
            return @"三年级";
            break;
        }
        case 4:{
            return @"四年级";
            break;
        }
        case 5:{
            return @"五年级";
            break;
        }
        case 6:{
            return @"六年级";
            break;
        }
        case 7:{
            return @"初一";
            break;
        }
        case 8:{
            return @"初二";
            break;
        }
        case 9:{
            return @"初三";
            break;
        }
        default:
            return @"一年级";
            break;
    }
}


@end
@implementation ZYCCourseRegistrationDetailModel

- (NSInteger)enrollCount{
    return self.studentInfos.count;
}
//    //报名状态（1-未开始，2-进行中，3-已结束）
- (NSString *)enrollStatusStr{
    if ([self.enrollStatus isEqualToString:@"1"]) {
        return @"未开始";
    }else if ([self.enrollStatus isEqualToString:@"2"]) {
        return @"进行中";
    }else{
        return @"已结束";
    }
}

- (NSString *)courseTimeTypeStr{
    if ([self.courseTimeType isEqualToString:@"1"]) {
        return @"周循环";
    }else if ([self.courseTimeType isEqualToString:@"2"]) {
        return @"跳周循环";
    }else{
        return @"自定义";
    }
}
- (NSString *)courseTypeStr{
    if ([self.courseType isEqualToString:@"1"]) {
        return @"兴趣课";
    }else if ([self.courseType isEqualToString:@"2"]) {
        return @"社团课";
    }else{
        return @"基础课";
    }
}





+ (nullable NSDictionary<NSString *, id> *)modelContainerPropertyGenericClass{
    
    return @{
            @"tcCourseTimeList":[ZYCCourseTeachTimeModel class],
            @"startTimeAndEndTime":[ZYCCourseTeachTimeModel class],
            @"studentInfos":[ZYCCourseStudentInfoModel class]
            
    };
}

@end
